﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin.master" EnableEventValidation="false" AutoEventWireup="true" CodeFile="orderdetails.aspx.cs" Inherits="admin_order_orderdetails" %>

<%@ Register src="../usercontrol/category.ascx" tagname="category" tagprefix="uc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<script type="text/javascript">
    function confirmdelete() {
        if (window.confirm("Bạn có muốn xoá sản phẩm này khỏi đơn đặt hàng không")) {
            return true;
        }
        return false;
    }
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceLeft" Runat="Server">
    <uc1:category ID="category1" runat="server" />
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<div class="portlet x9">
    <div class="portlet-header"><h4>Chi tiết đơn đặt hàng</h4></div>
    <div class="portlet-content">
    
     <asp:Panel ID="porder" Visible="false" runat="server">
         <asp:Label ID="lbmessage" runat="server" Text=""></asp:Label>
        <div>
            <div class="pcartrow">
                  <div><label>Mã đơn hàng</label></div>
                  <div><asp:Literal ID="Lid" runat="server"></asp:Literal></div>  
             </div>     
             <div class="pcartrow">
                  <div><label>Tên khách hàng</label></div>
                  <div><asp:Literal ID="Litenkh" runat="server"></asp:Literal></div>  
             </div>
             <div class="pcartrow">
                  <div><label>Địa chỉ</label></div>
                  <div><asp:Literal ID="Liaddress" runat="server"></asp:Literal></div>  
             </div>  
             <div class="pcartrow">
                  <div><label>Điện thoai</label></div>
                  <div><asp:Literal ID="lidt" runat="server"></asp:Literal></div>  
             </div> 
             <div class="pcartrow">
                  <div><label>Công ty</label></div>
                  <div><asp:Literal ID="Licty" runat="server"></asp:Literal></div>  
             </div>  
             <div class="pcartrow">
                  <div><label>Tổng số tiền</label></div>
                  <div><asp:Literal ID="Litotal" runat="server"></asp:Literal></div>  
             </div>  
        </div>
    </asp:Panel>
        <div>
            <asp:ListView ID="Lisproducts" runat="server" 
                onitemdeleting="Lisproducts_ItemDeleting">
            <LayoutTemplate>
                         <div class ="pcartborder">
                       
                        <div class ="pcartrow header" style ="font-weight: bold;">
                            <div class ="pcartitemno">STT</div>
                            <div class ="prcol">Mã sản phẩm</div>
                            <div class ="pcol" style="width: 200px">Tên sản phẩm</div>
                            <div class = "prcol">Số lượng</div>
                             <div class = "prcol">Đơn vị tính</div>
                            <div class = "prcol">Đơn giá</div>
                            <div class="prcol"></div>
                        </div> 
                        
                                <asp:PlaceHolder runat="server" ID="itemPlaceholder" />
                     </div>
            </LayoutTemplate>
            <ItemTemplate>
                <div class="pcartrow" style=" border: solid 1px #e0e0e0">
                            <div class ="pcartitemno">
                                   <%# Container.DataItemIndex + 1 %>
                                </div>
                              
                                <asp:HiddenField ID="hdid" runat="server" Visible = "false"  Value = '<%#Eval("Products_Id")%>' />
                                <div class ="prcol">
                                   <%#Eval("Products_Id")%>
                                </div>
                                <div class ="pcol" style=" width: 200px">
                                   <%#Eval("Products_Name")%>
                                </div>
                                <div class = "prcol">
                                      <%#Eval("Quantity")%>
                                </div>
                                <div class = "prcol">
                                      <%#Eval("Unit")%>
                                </div>
                                 <div class = "prcol">
                                      <%#Eval("Price","{0:0,0}")+" vnđ"%>
                                </div>
                   
                                  <div class="pcartitemno">
                                    <asp:ImageButton ID=  "btnDelete"    CommandName = "Delete"  runat="server" OnClientClick = "return confirmdelete()" ImageUrl ="http://localhost:2011/didong/images/design/delete_on.gif"  AlternateText = "Del"  Width = "15" Height ="18"  ToolTip = "Xóa sản phẩm"/> 
                                  </div>
                                
                        
                        </div>
            
            </ItemTemplate>
            </asp:ListView>
           <asp:Panel ID="Psumit" Visible="false" runat="server">
            <div style=" margin-top: 10px; text-align: center">
                 
                 <div style=" margin: 10px; padding-bottom:10px;display:inline; text-align:center"> 
                    <asp:Button ID="Button1"  CssClass="btn delete" runat="server" Text="Xoá" 
                         onclick="Button1_Click" />
                 
                </div>
                 <div style=" margin: 10px; padding-bottom:10px;display:inline; text-align:center"> 
                    <asp:Button ID="Button2"  CssClass="btn btn-print" runat="server" Text="IN" />
                 
                </div>
                </div>
             </asp:Panel>
        </div>
    </div>
</div>
</asp:Content>

